<?php
/**
 * Implements command WNvigator/getMap
 * @package WNavigator
 * @ignore
 */
require_once 'WKernel/Command/Abstract.php';
class WN_Cmd_getMap extends WK_Command_Abstract {
	public function exec() {
		$map  = WK_App::getComponent('WNavigator')->getMap();		
		if(empty($page)){
			throw WK_Application::getException(404, 'Page not found');				
		}
		else {
			$page->expandMeta();
			$this->result = $page->toData($this->params['expand']);
		}			
	}	
}